package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/TestLock")
@Slf4j
public class LockTestController {
    @Reference
    OrderService orderService;

    @RequestMapping("/Test")
    public void TestLock() {
        log.debug("锁测试开始");
        orderService.TestLock();
        log.debug("锁测试结束");
    }
}
